Skip to content

Conversation

@carlosthe19916
Copy link
Collaborator

@carlosthe19916 carlosthe19916 commented Sep 19, 2025

Summary by Sourcery

Integrate ExploitIQ into the client by defining the analysis schema, adding create/fetch endpoints and React query hooks, extending the SBOM vulnerabilities table with analysis controls, and introducing a new Analysis Details page for report viewing.

New Features:

  • Introduce ExploitIQ integration with new API endpoints and data model
  • Enable creation and viewing of ExploitIQ vulnerability analyses from the SBOM details UI
  • Add dedicated Analysis Details page and routing to display full analysis reports

Enhancements:

  • Use local storage to track created analyses within the vulnerabilities table
  • Mock SBOM advisory data for development instead of real API calls
  • Remove unused delete vulnerability mutation

Signed-off-by: Carlos Feria <[email protected]>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 19, 2025

Reviewer's Guide

This PR adds client-side support for ExploitIQ integration by defining new data models and API endpoints, implementing React hooks and UI components for creating and viewing analysis reports within the vulnerabilities-by-sbom page, introducing a dedicated analysis details page with routing, and supplying mock SBOM advisory data.

File-Level Changes

Change Details Files
Define ExploitIQ data model and API contract
  • Added ExploitIQAnalysis interface
  • Extended openapi spec with create/fetch endpoints
  • Configured ReportRequest and ReportResult schemas
client/src/app/api/models.ts
client/openapi/trustd.yaml
Implement React query hooks for analysis operations
  • Created useFetchAnalysisById query
  • Created useCreateAnalysisMutation mutation
client/src/app/queries/analysis.ts
Integrate analysis UI into vulnerabilities table
  • Added analysis column
  • Hooked useLocalStorage for tracking reports
  • Rendered CreateAnalysis and ViewAnalysis components
client/src/app/pages/sbom-details/vulnerabilities-by-sbom.tsx
Add CreateAnalysis and ViewAnalysis components
  • Implement button to trigger report creation
  • Implement status indicator and navigation for viewing reports
client/src/app/pages/sbom-details/components/CreateAnalysis.tsx
client/src/app/pages/sbom-details/components/ViewAnalysis.tsx
Add AnalysisDetails page and route
  • New AnalysisDetails component displaying report output
  • Updated Routes.tsx to include analysisDetails path
client/src/app/pages/analysis-details/analysis-details.tsx
client/src/app/pages/analysis-details/index.ts
client/src/app/Routes.tsx
Introduce SBOM mock and update advisory query
  • Added SBOM_MOCK fixture
  • Refactored useFetchSbomsAdvisory to use mock data
client/src/app/queries/mock.ts
client/src/app/queries/sboms.ts
Clean up obsolete vulnerability mutation
  • Removed deleteVulnerability mutation
client/src/app/queries/vulnerabilities.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant